﻿<Window x:Class="BizTalkZombieManagement.UI.Configuration.View.Configurator"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="BizTalk Zombie Management Configuration Tool" Height="370" Width="490">
    
    <Grid Margin="5">
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="8*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="67*"/>
            <ColumnDefinition Width="137*"/>
            <ColumnDefinition Width="40*"/>
        </Grid.ColumnDefinitions>



        <RadioButton Content="File" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Name="rbFile"  GroupName="DumpType" Grid.Row="2" IsEnabled="{Binding IsActiveCommand}" IsChecked="{Binding Path=FileSelected}"/>
        <StackPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Top">
            <TextBlock Grid.Row="2" Grid.Column="1" Text="Please select a folder : "  IsEnabled="{Binding FileSelected}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Height="24"/>
            <StackPanel Orientation="Horizontal" >
                <TextBox Grid.Row="2" Grid.Column="1" IsEnabled="{Binding FileSelected}" Text="{Binding FolderPath,Mode=TwoWay}" Width="199" Height="24"/>
                <Button  Grid.Row="2" Grid.Column="1"  HorizontalAlignment="Right" IsEnabled="{Binding FileSelected}" Content="Browse" Command="{Binding ClickBrowseFolder}" />
            </StackPanel>
        </StackPanel>
        <RadioButton Content="MSMQ" VerticalAlignment="Top"  HorizontalAlignment="Left" Name="rbMsmq" GroupName="DumpType"  Grid.Row="4" IsEnabled="{Binding IsActiveCommand}" IsChecked="{Binding Path=MsmqSelected}" />
        <StackPanel Grid.Column="1" Grid.Row="4">
            <TextBlock Grid.Row="4" Grid.Column="1" Text="Please Set the address : "  IsEnabled="{Binding MsmqSelected}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="24"/>
            <TextBox Grid.Row="4" Grid.Column="1" IsEnabled="{Binding MsmqSelected}"  Text="{Binding MsmqPath,Mode=TwoWay}" Height="24"/>
        </StackPanel>

        <RadioButton Content="WCF" VerticalAlignment="Top"  HorizontalAlignment="Left" Name="rbWCF" GroupName="DumpType"   Grid.Row="6" IsEnabled="{Binding IsActiveCommand}" IsChecked="{Binding WcfSelected}" />
        <StackPanel  Grid.Row="6" Grid.Column="1">

            <ComboBox ItemsSource="{Binding WcfBindingType, Mode=OneWay}" IsEnabled="{Binding WcfSelected}" Grid.Row="4" Grid.Column="1" SelectedIndex="1" SelectedValue="{Binding SelectedBindingType, Mode=TwoWay}" VerticalAlignment="Top" Margin="0,0,0,5"/>

            <TextBlock Grid.Row="6" Grid.Column="1" Text="Please Set the address : "  IsEnabled="{Binding WcfSelected}" HorizontalAlignment="Left" Height="24"/>
            <TextBox Grid.Row="6" Grid.Column="1" IsEnabled="{Binding WcfAndBindingTypeSelect}" Text="{Binding WcfUri,Mode=TwoWay}" Height="24" />

        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="8" Grid.Column="1" HorizontalAlignment="Center">
            <Button Content="{Binding ServiceAction}"  Command="{Binding ManageServiceCommand}" Margin="0,0,5,0" Height="24"/>
            <Button Content="Save Configuration" Command="{Binding SaveConfigurationCommand }" IsEnabled="{Binding ConfigChange}" Margin="5,0,0,0" />
        </StackPanel>
    </Grid>
</Window>        